import { get, post, put, download, postHistoryDataListExcel } from "./http";
import { url } from '@/plugins/url';



const getReportList = data => post(url + 'report/word/list', data);//报告报表请求列表
const gekaptcha = data => post(url + 'system/user/kaptcha', data);//获取短信验证码
const downloadDocument = (data, name) => download(url + 'report/word/download', data, name);//报告报表文件下载
const wordAddAction = (data, config) => post(url + 'report/word/add', data, config);//报告报表新增
const reportDelete = data => post(url + 'report/word/delete', data);//报告报表删除
const reportUpdate = (data, config) => post(url + 'report/word/update', data, config);//报告报表待处理
const systemRoleAction = data => get(url + '/system/role/get', data);//角色数据
const auditAction = data => post(url + '/warning/audit', data);//预警管理/审核通过
const rejectionAction = data => post(url + '/warning/rejection', data);//预警管理/驳回
const pointAdd = data => post(url + '/monitoringpoint/monitoringcar-point/add', data);//新增监测车点位
const getCartList = () => get(url + '/repertory/in-storage/carList');//获取监测车列表
const getStreetList = () => get(url + '/station/water-station/streetMessage');//获取所属街道办列表
const getPointList = data => get(url + '/monitoringpoint/monitoringcar-point/getLastest', data);//获取点位信息列表
const getHistoricalDataList = data => post(url + '/monitoringpoint/monitoringcar-point/list', data);//根据监测车编号或点位名称或时间段获取对应的点位信息
const updatePonit = data => post(url + '/monitoringpoint/monitoringcar-point/update', data)//修改监测车点位
const getHistoricalData = data => post(url + '/monitoringpoint/monitoringcar-point/getDatas', data)//监测车历史数据
const getPointNames = data => get(url + '/monitoringpoint/monitoringcar-point/getPointNames', data)//查询指定监测车编号的对应点位名称
const downHistoryDataListisExcel = (data) => postHistoryDataListExcel(url + '/monitoringpoint/monitoringcar-point/export', data)//以往监测车点位数据导出excel表格
const waterPerlod = (data) => post(url + 'station/water-data/period', data)//数据分析/因子超标时段
const waterRate = (data) => post(url + '/station/water-data/rate', data)//数据分析/水质分析
const meanRate = (data) => post(url + '/station/water-data/mean', data)//数据分析/日均分析值
const meanRateDownload = (data) => postHistoryDataListExcel(url + '/station/water-data/mean/export', data)//数据分析/日均分析值导出
const factorAll = (data) => get(url + '/system/factor/all', data)//因子配置/查询所有监测因子
const factorAdd = (data) => post(url + '/system/factor/add', data)//因子配置/新增监测因子
const factorDelete = (data) => post(url + '/system/factor/delete', data)//因子配置/删除监测因子
const factorList = (data) => post(url + '/system/factor/list', data)//因子配置/查询监测因子
const factorUpdate = (data) => post(url + '/system/factor/update', data)//因子配置/修改监测因子
const realform = (data) => post(url + '/station/water-data/realform', data)//实时设备历史数据图表 
const reallist = (data) => post(url + '/station/water-data/reallist', data)//实时设备历史数据列表
const realExcel = (data) => postHistoryDataListExcel(url + '/station/water-data/realExcel', data)//实时设备历史数据导出excel
const period = (data) => post(url + '/excessivedata/period', data)//数据分析超标时段分析
const site = (data) => post(url + '/excessivedata/exceeded/site', data)//数据分析超标站点分析
const sitedata = (data) => post(url + '/excessivedata/exceeded/data', data)//单个站点超标数据获取
const exceeded = (data) => post(url + '/excessivedata/period/exceeded', data)//根据时间区间和站点名称获取某个时间点的超标数据
const street = (data) => post(url + '/station/street/msg', data)//街道与站点信息
const YoYMoM = (data) => post(url + '/station/water-data/YoYMoM', data)//同比环比信息获取
const stationStreet = (data) => post(url + '/station/water-station/street', data)//根据用户获取站点和街道信息
const excessivedataStreet = (data) => post(url + '/excessivedata/street', data)//某个街道所有站点超标数据情况 
const excessivedataAll = (data) => post(url + '/excessivedata/all', data)//全区所有站点超标数据情况 
// const testAction = data => post('/api/vip', data);//mock请求
const stationSystem = (data) => get(url + '/station/water-station/stationSystem', data)//因子配置/查询所有水站的水站名和设备系统号列表
const updateUser = (data) => put(url + '/system/user/modify', data)//修改用户
export {
  gekaptcha,
  getReportList,
  downloadDocument,
  wordAddAction,
  reportDelete,
  reportUpdate,
  systemRoleAction,
  auditAction,
  rejectionAction,
  // testAction,
  pointAdd,
  getCartList,
  getStreetList,
  getPointList,
  updatePonit,
  getHistoricalDataList,
  getHistoricalData,
  downHistoryDataListisExcel,
  getPointNames,
  waterPerlod,
  waterRate,
  meanRate,
  meanRateDownload,
  factorAll,
  factorAdd,
  factorDelete,
  factorList,
  factorUpdate,
  realform,
  reallist,
  realExcel,
  period,
  site,
  sitedata,
  exceeded,
  street,
  YoYMoM,
  stationStreet,
  excessivedataStreet,
  excessivedataAll,
  stationSystem,
  updateUser
}

